import React from 'react';

import { Table, Space, Button } from 'antd';

const columns = [
  {
    title: '标题',
    dataIndex: 'title',
    key: 'title',
  },
  {
    title: '创建时间',
    dataIndex: 'created_at',
    key: 'created_at',
  },
  {
    title: '简介',
    dataIndex: 'desc',
    key: 'desc',
  },
  {
    title: '封面图',
    key: 'cover_image_url',
    dataIndex: 'cover_image_url',
    render: url => (
      <>

      </>
    ),
  },
  {
    title: '内容',
    dataIndex: 'content',
    key: 'content',
    render: (text, record) => (
      <>

      </>
    ),
  },
  {
    title: '操作',
    render: (text, record) => {
      return <Space>
        <Button type={'danger'}>下架</Button>
      </Space>;
    },
  },
];

export default class Manage extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      data: [],
      pageSize: 10,
      page: this.props.history.location.query.page ? this.props.history.location.query.page : 1,
      total: 0,
      spinning: true,
    };
  }

  componentDidMount() {

  }


  render() {
    return (
      <div style={{ padding: 30 }}>
        <Table columns={columns} dataSource={this.state.data}/>
      </div>
    );
  }
}
